# Maintainer: BlackEagle <ike.devolder@gmail.com>>

pkgname=kodi-addon-screensaver-pingpong
epoch=1
pkgver=20.2.0
_codename=Nexus
pkgrel=4
pkgdesc="Ping-pong screensaver for Kodi"
arch=('loong64' 'x86_64')
url='https://github.com/xbmc/screensaver.pingpong'
license=('GPL')
groups=('kodi-addons' 'kodi-addons-screensaver')
makedepends=('cmake' 'glm' 'kodi-dev')
options=(!lto)
source=("$pkgname-$pkgver.tar.gz::https://github.com/xbmc/screensaver.pingpong/archive/$pkgver-$_codename.tar.gz")
sha512sums=('56efc4c055fdcc3bbe8614c57de5bc0d224e2c53a5202797c9c92c51e444a9c952cab8364927b9420cf33bbcdfc82e07e1cecc2c9f680a2320cb4b4daea2df1b')

build() {
    cd "screensaver.pingpong-$pkgver-$_codename"
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_SHARED_LIBS=1 \
        -DUSE_LTO=1 \
        .
    make
}

package() {
    depends=('kodi' 'glm')
    cd "screensaver.pingpong-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
}

